checkCookie()
var mid= $.cookie('mid')
var token= $.cookie('token')
$(function () {
	$('.footer').on('click',function () {
		// alert(1);
		var textareaContents = $('#textareaContents').val()

		//返回
		$('.back').on('click',function () {
			history.go(-1);
		});

		if( textareaContents != '' ) {
			$.ajax({
				url:feedBackUrl,
				type:"post",
				data:{mid:mid,token:token,ask_content:textareaContents},
				dataType:'text',
				success:function (data) {
					console.log(data);

					var state = JSON.parse(data).state;
					
					if(state == 1) {
						
						location.href = './feed_back_res.html';

					}

				},
				error:function () {

				}
			})	
		}else {
			alert('请输入建议内容！');
		}
		
	})
	
})